<?php
require_once("conn.php");
require_once("functions.php");
//echo "<pre>";
//print_r($config);
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>微有趣</title>
		<meta name="keywords" content=""/>
		<meta name="description" content=""/>
		<meta name="apple-mobile-web-app-capable" content="yes"/>
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">
		<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
		<link rel="stylesheet" type="text/css" href="./assets/css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="./assets/css/msg.css"/>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		<script>
			function changeSize() {
				var propo = $(window).width() / 640;
				$('html').css('font-size', 40 * propo + 'px');
			};
			changeSize();
			$(window).resize(function() {
				changeSize();
			});
		</script>
	</head>
	<body>
		<div class="wrap">
			<div class="new">
				<ul class="new_list">
					<?php
					$allSql = "select * from `sys_message` order by `date` desc";
					$allRow = $mysql->query($allSql);
					foreach($allRow as $value){
					?>	
					<li class="new_task">
						<div class="new_nav">
							<span class="new_score"><?=$value['date']?></span>
							<div class="new_con"><?=$value['title']?></div><span class="chart"></span>
						</div>
						<div class="new_down  clearfix border2">
							<div class="ms"><?=$value['content']?></div>
						</div>
					</li>
				<?php }?>
				</ul>
			</div>
		</div>
		
		<script type="text/javascript">
			$(function(){
					var num = true;
					$(".new_nav").click(function(){
						if($(this).siblings(".new_down").css("display") == "block"){
							num= false;
						}else{
							num = true;
						}
						if(num){
							num = false;
							$(this).siblings(".new_down").show();
							$(this).find(".chart").css("background-image","url(../weiApp/assets/images/msg/top.png)");
						}else{
							num = true;
							$(this).siblings(".new_down").hide();
							$(this).find(".chart").css("background-image","url(../weiApp/assets/images/msg/down.png)");
						}
						
					});	
			});
		</script>
	</body>
</html>
